package com.mlethe.library.dialog.demo;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.mlethe.library.dialog.DialogFragment;
import com.mlethe.library.dialog.demo.databinding.DialogTestSecondBinding;

/**
 * @author Mlethe
 * @date 2020/8/5
 */
public class TestSecondDialog extends DialogFragment {

    private DialogTestSecondBinding binding;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = DialogTestSecondBinding.inflate(inflater, container, false);
        return binding.getRoot();
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        binding.dialogLeftBtn.setOnClickListener(v -> dismiss());
        binding.dialogRightBtn.setOnClickListener(v -> dismiss());
    }
}
